/* const { zip } = require("compressing");

const p = zip.compressDir("./node文件系统", "node文件系统.zip");

p.then(() => {
  console.log("压缩成功");
}).catch(() => {
  console.log("压缩失败");
}); */

// console.log(arguments.callee + "");

/**
 * try...catch作用域
 */
/* (function () {
  let x, y;
  try {
    throw new Error("错误");
  } catch (x) {
    (x = 1), (y = 2);
    console.log(x);
  }

  console.log(x, y);
})(); */

/**
 * 函数变量名与参数名冲突
 */
/* function foo(x) {
  y = 3;
  console.log(x);
}
foo(4);
console.log(y); */

/**
 * 数组方法concat() 参数是数组或值
 */
const arr1 = [1, 2, 3];
const arr2 = [4, 5, 6];

console.log(arr1.concat(arr2));
console.log(arr1.concat(3));
